//
//  AppDataManager.h
//  AppData
//
//  Created by CPX on 2018/5/23.
//  Copyright © 2018年 CPX. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "Language.h"
#import "AppDataTypes.h"


extern NSString  * const AppLayoutDirectionChangeNotification;
extern NSString  * const PrayTimeAlgorithmChangedNotification;

/**
 应用全局数据类
 @author yzl
 */
API_AVAILABLE(ios(9.0))
@interface AppDataManager : NSObject

+ (void)registerApp;

+ (instancetype)sharedManager;


/**
 第一次打开
 */
@property (nonatomic) BOOL isFirstOpen;

/**
 App布局方向
 */
@property (nonatomic) AppLayoutDirection layoutDirection;


/**
 App语言
 */
//@property (nonatomic,strong) Language *language;

@property (nonatomic,strong) NSString *uuid;

/**
 App时间格式
 */
@property (nonatomic) AppTimeFormat timeFormat;

@property (nonatomic,copy) NSString *locationCity; ///<地区城市


@property (nonatomic) double latitude;
@property (nonatomic) double longitude;

//pray time 算法
@property (nonatomic) NSInteger asr; ///<0 1， 默认 0
@property (nonatomic) NSInteger highLatitude; ///<1，2，3  默认2
@property (nonatomic) NSInteger prayTimeCalMeth; ///见 PrayTime.h

@property (nonatomic) BOOL enableReadProgress; ///<

@property (nonatomic) UISemanticContentAttribute semanticContentAttribute; ///<RTL适配

//用户
@property (nonatomic, copy) NSString *userToken; ///<用户token
@property (nonatomic, copy) NSString *uid; ///<用户id

@property (nonatomic, copy) NSString *email; ///<用户账号
@property (nonatomic, copy) NSString *username; ///<用户昵称
@property (nonatomic, copy) NSString *avatar; ///<头像

@property (nonatomic) BOOL isLogin; ///<是否登录了

//黑夜
@property (nonatomic) BOOL isNight; ///<黑夜模式


@end
